import pkg from '../../package.json'

/** 缓存键的前缀 */
const CACHE_PREFIX = pkg.name.toUpperCase()

/** 缓存数据时用到的 Key */
export class CacheKey {
  static readonly ACCESS_TOKEN = `${CACHE_PREFIX}-ACCESS-TOKEN`
  static readonly SIDEBAR_STATUS = `${CACHE_PREFIX}-SIDEBAR-STATUS`
  static readonly PROJECT_CONFIG = `${CACHE_PREFIX}-PROJECT-CONFIG`
  static readonly USER_INFO = `${CACHE_PREFIX}-USER-INFO`
  static readonly MENU_SELECTEDKEYS = `${CACHE_PREFIX}-MENU-SELECTEDKEYS` // 菜单栏当前选中项缓存
  static readonly MENU_OPENKEYS = `${CACHE_PREFIX}-MENU-OPENKEYS` // 菜单栏当前展开项缓存
  static readonly MENU_BREADCRUMB = `${CACHE_PREFIX}-MENU-BREADCRUMB` // 菜单导航栏-面包屑缓存
}
